package com.dungpt.truyenhay.model;

/**
 * Created by TienDung on 12/15/2014.
 */
public class Story {
    private String storyID, name, imgurl, chapter, ratingtotal, ratingcount,
            dateupdate;

    public Story() {
    }

    public Story(String storyID, String name, String imgurl, String chapter,
                 String ratingtotal, String ratingcount, String dateupdate) {
        this.storyID = storyID;
        this.name = name;
        this.imgurl = imgurl;
        this.chapter = chapter;
        this.ratingtotal = ratingtotal;
        this.ratingcount = ratingcount;
        this.dateupdate = dateupdate;
    }

    @Override
    public String toString() {
        return storyID + " - " + name + " - " + imgurl + " - " + chapter
                + " - " + ratingtotal + " - " + ratingcount + " - "
                + dateupdate;
    }

    public String getStoryID() {
        return storyID;
    }

    public void setStoryID(String storyID) {
        this.storyID = storyID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgurl() {
        return imgurl;
    }

    public void setImgurl(String imgurl) {
        this.imgurl = imgurl;
    }

    public String getChapter() {
        return chapter;
    }

    public void setChapter(String chapter) {
        this.chapter = chapter;
    }

    public String getRatingtotal() {
        return ratingtotal;
    }

    public void setRatingtotal(String ratingtotal) {
        this.ratingtotal = ratingtotal;
    }

    public String getRatingcount() {
        return ratingcount;
    }

    public void setRatingcount(String ratingcount) {
        this.ratingcount = ratingcount;
    }

    public String getDateupdate() {
        return dateupdate;
    }

    public void setDateupdate(String dateupdate) {
        this.dateupdate = dateupdate;
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof Story) {
            Story f = (Story) o;
            return this.storyID.equalsIgnoreCase(f.getStoryID());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return this.storyID.hashCode();
    }
}
